//
//  MainViewController.swift
//  麦兜直播
//
//  Created by yeqingyu on 16/9/25.
//  Copyright © 2016年 yeqingyu. All rights reserved.
//

import UIKit

class MainViewController: UITabBarController {

    override func viewDidLoad() {
        super.viewDidLoad()
        let HomeVc = UIStoryboard(name: "Home", bundle: nil).instantiateInitialViewController()
        let LiveVc = UIStoryboard(name: "Live", bundle: nil).instantiateInitialViewController()
        let AttentionVc = UIStoryboard(name: "Attention", bundle: nil).instantiateInitialViewController()
        let profileVc = UIStoryboard(name: "Profile", bundle: nil).instantiateInitialViewController()
        
        setUpChilendController(HomeVc!)
        setUpChilendController(LiveVc!)
        setUpChilendController(AttentionVc!)
        setUpChilendController(profileVc!)
    }

}


extension MainViewController{

     func setUpChilendController(_ vc:UIViewController){

       addChildViewController(vc)
    }


}
